package com.service.service.impl;

import com.service.mapper.IUserMapper;
import com.service.pojo.User;
import com.service.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户业务层实现
 */
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserMapper userMapper;
    /**
     * 查询所有用户信息
     *
     * @return
     */
    @Override
    public List<User> findAllUser() {
        return this.userMapper.selectAll();
    }

    /**
     * 根据id查询用户信息
     *
     * @param id
     * @return
     */
    @Override
    public User findOneUser(Integer id) {
        return this.userMapper.findOneUser(id);
    }
}
